'use strict';
var Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.Code = {
    type: String,
    Name: '编码',
    IsUnique: true,
    IsEmpty: false,
    trim: true
};

modelField.Name = {
    type: String,
    trim: true,
    Name: '名称',
    IsEmpty: false
};

modelField.IsSystem = {
    type: Boolean,
    Name: '系统预置'
};

modelField.Remark = {
    type: String,
    Name: '备注'
};

modelField.Options = {
    type: [{ Value: Number, Name: String }],
    Name: '值集'
};

var newModel = new Model(modelField);
newModel.addIndex({Name: 1});
newModel.addIndex({Code: 1}, {"unique": true});
newModel.create('ExtendEnum', '扩展枚举');
